import Instance from '../ajax';
//首页
//轮播图
export const fetchBanner = (params) => {
  return Instance.get('/api/banner', {
    params,
  });
};
//发现音乐
export const fetchPerson = (params) => {
  return Instance.get('/api/personalized', {
    params,
  });
};

//首页推荐歌单
export const fetchDiscoverSGer = (params) => {
  return Instance.get('/api/personalized/newsong', {
    params,
  });
};

//首页最新mv
export const fetchDiscoverMv = (params) => {
  return Instance.get('/api/personalized/mv', {
    params,
  });
};
//获取第二个页面的上面精品歌单数据
// export const fetchPlayListTopNav = (params) => {
//     return Instance.get("/api/playlist/detail", {
//         params,
//     });
// };

//第二个页面获取歌曲列表id//////top/playlist/highquality
export const fetchPlayListSongsId = (params) => {
  return Instance.get('/api/top/playlist/highquality', {
    params,
  });
};

//获取歌单详情上面的信息
export const fetchPlayListMore = (params) => {
  return Instance.get('/api/playlist/detail', {
    params,
  });
};
//获取歌单详情歌曲的信息song/detail
export const fetchPlayListSongs = (params) => {
  return Instance.get('/api/song/detail', {
    params,
  });
};

//获取歌单详情的评论comment/playlist/comment/playlist

export const fetchPlayListComment = (params) => {
  return Instance.get('/api/comment/playlist', {
    params,
  });
};

//列表获取歌单
export const fetchPlayList = (params) => {
  return Instance.get('/api/top/playlist', {
    params,
  });
};

//列表最新音乐
export const fetchNewSong = (params) => {
  return Instance.get('/api/top/song', {
    params,
  });
};

// 列表最新mv
export const fetchMV = (params) => {
  return Instance.get('/api/mv/all', {
    params,
  });
};

//列表获取歌单里面歌单详情
export const fetchPlaylistDetail = (params) => {
  return Instance.get('/api/', {
    params,
  });
};

//歌词界面的评论列表
//https://api.mtnhao.com/comment/music?id=1479706965&pageSize=20&offset=0
export const fetchPlayLyricsComment = (params) => {
  return Instance.get('/api/comment/music', {
    params,
  });
};

//mv播放界面里面的评论https://api.mtnhao.com/comment/mv?id=10952197&pageSize=20&offset=0
export const fetchPlayMvComment = (params) => {
  return Instance.get('/api/comment/mv', {
    params,
  });
};
////mv播放界面里面的推荐mv、、、、https://api.mtnhao.com/simi/mv?mvid=10952197
export const fetchPlaySimiMv = (params) => {
  return Instance.get('/api/simi/mv', {
    params,
  });
};
//////mv播放界面里面的MV地址链接https://api.mtnhao.com/mv/url?id=10952197
export const fetchPlayMvUrl = (params) => {
  return Instance.get('/api/mv/url', {
    params,
  });
};
///mv播放界面里面的MV介绍文字https://api.mtnhao.com/mv/detail?mvid=10952197
export const fetchPlayMvDetail = (params) => {
  return Instance.get('/api/mv/detail', {
    params,
  });
};
//mv播放界面里面的MV log 图片https://api.mtnhao.com/artists?id=27693936
export const fetchPlayMvImg = (params) => {
  return Instance.get('/api/artists', {
    params,
  });
};
// 获取歌词https://api.mtnhao.com/lyric?id=1480280185
export const fetchLyric = (params) => {
  return Instance.get('/api/lyric', {
    params,
  });
};

//登入之后的数据
//https://api.mtnhao.com/user/detail?uid=1330668741
export const fetchLUserDatail = (params) => {
  return Instance.get('/api/user/detail', {
    params,
  });
};
//https://api.mtnhao.com/user/playlist?uid=1330668741&limit=1000
export const fetchLUserPlaylist = (params) => {
  return Instance.get('/api/user/playlist', {
    params,
  });
};
